﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using WebChatApi.Common.Interface;

namespace WebChatApi.Common
{
    /// <summary>
    /// Abstract class for base mapping object.
    /// </summary>
    /// <typeparam name="TKey">The type of the key.</typeparam>
    /// <typeparam name="TTargetKey">The type of the target key.</typeparam>  
    [KnownType(typeof(BaseObject))]
    
    public abstract class BaseMappingObject<TKey, TTargetKey> : BaseObject, IIdentifiable
    {
        #region Properties

        /// <summary>
        /// Gets or sets the source key.
        /// </summary>
        /// <value>
        /// The source key.
        /// </value>
        public TKey SourceKey
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the target key.
        /// </summary>
        /// <value>
        /// The target key.
        /// </value>
        public TTargetKey TargetKey
        {
            get;
            set;
        }

        #endregion

        #region Constructor

        /// <summary>
        /// Initializes a new instance of the <see cref="BaseMappingObject{TKey, TTargetKey}"/> class.
        /// </summary>
        public BaseMappingObject()
            : base()
        {
        }

        #endregion
    }
}
